package com.yikome.shop.repository;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.yikome.common.CommonRepository;
import com.yikome.shop.entity.Shop;

@Repository
public interface ShopRepository extends CommonRepository<Shop, Long> {

	Shop findTopByLocationContaining(String location);

	@Query("select t from Shop t where t.id = :id and t.yn = 1")
	Shop findShop(@Param("id")Long id);
}
